<%@page import="com.winexpress.product.Comment"%>
<%@page import="com.winexpress.product.Wine"%>
<%@page import="java.util.List"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
<!DOCTYPE html>
<html>
    <head>
    
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>wineXpress Admin Home</title>

    </head>

<body>
    <t:adminNavigation/>
    <br/><br/><br/><br/><br/>
    <div class="container">
        <% List<Wine> inWine = (List<Wine>) request.getAttribute("wineList");%>
        <% if (inWine != null) {%>
        <% for (Wine w : inWine) {%>
        <table border="1">
            <tr><td colspan="2"><% out.print(w.getId() + " ");%><% out.print(w.getName());%></td></tr>
                <% List<Comment> comments = w.getComments();%>
                <% for (Comment c : comments) {%>
                <% if (c.getNature().equals("negative")) {%>
            <tr>
                <td width="300px;"><% out.print(c.getComment());%></td>
                <td>
                    <form action="/WineXpressClient/adminComment/sentimentComment">
                        <input id="delete" name="delete" type="hidden" value="1" />
                        <input id="commentID" name="commentID" type="hidden" value="<%out.print(c.getId());%>">
                        <input type="submit" value="Delete" />
                    </form>
                </td>
            </tr>
            <% }%>
            <% }%>
        </table>
        <%}%>
        <% }%>
    </div>
</body>
</html>
